import { IFeidaoAiBrowserComponent } from '@dfeidao/atom-web/interfaces';
import set_node_cls from '@dfeidao/atom-web/ui/set-node-cls';
import nodejs from '@dfeidao/atom-web/msg/nodejs';
import p001 from './p001';
import render from '@dfeidao/atom-web/render/render';
import p002 from './p002';
import set from '@dfeidao/atom-web/local/set';

export default async function a001(fd: IFeidaoAiBrowserComponent, plan_list_no: string) {
	// 编辑
	const n = fd.data.node.querySelector<HTMLDivElement>('[data-id="edit"]');
	set_node_cls(n, 'display-n', false);
	console.log('bianji', plan_list_no);
	set(fd, 'plan_list_no', plan_list_no)
	const res = await nodejs('wangju/zj-000002/s001', {
		plan_list_no
	});
	console.log(res);
	render(fd, res, p001, 'p001', 'inner');
	render(fd, res, p002, 'p002', 'inner');
	const res1 = await nodejs('wangju/zj-000002/s002', {
	});
	console.log(res1);
}
